<%@ page import="java.util.Date" %><%--
  Created by IntelliJ IDEA.
  User: lzy
  Date: 2018/7/24
  Time: 14:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Test jsp</title>
</head>
<body>
<%
    Date date = new Date();
    out.println(date);
%>
<br><br>
<%--jsp表达式--%>
<%=date%>

<br><br>
<%
    String ageStr = request.getParameter("age");
    Integer age = Integer.parseInt(ageStr);

    if (age >= 18) {
%>
成年人...
<%
} else {
%>
未成年人...
<%
    }
%>
</body>
</html>
